package charles.testproject.jlisttest;

import java.awt.BorderLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

 public class Frame6 extends JFrame {  
	     private JPanel jPanel1 = new JPanel();;  
	     private JButton jButton1 = new JButton();;  
	     private JButton jButton2 = new JButton();;  
	     private JButton jButton3 = new JButton();;  
	     private JLabel jLabel1 = new JLabel();;  
	     private JTextField jTextField1 = new JTextField();;  
	     private JLabel jLabel2 = new JLabel();;  
	     private JTextField jTextField2 = new JTextField();;  
	     private GridBagLayout gridBagLayout1 = new GridBagLayout();;  
	   
	     public Frame6() {
	    	 
	         try {  
	             jbInit();;  
	         }  
	         catch(Exception e) {  
	             e.printStackTrace();;  
	         }  
	     }  
	     public static void main(String[] args) {  
	         Frame6 frame6 = new Frame6();
	         frame6.setVisible(true);
	     }  
	     private void jbInit() throws Exception {  
	         jPanel1.setBorder(BorderFactory.createRaisedBevelBorder());  
	         jPanel1.setLayout(gridBagLayout1);;  
	         jButton1.setText("新用户注册");  
	         jButton2.setText("注册用户登陆");  
	         jButton3.setText("匿名用户登录（仅供使用一次）");  
	         jLabel1.setText("用户名");  
	         jLabel2.setText("密码");  
	         jTextField2.setText("******");;  
	         this.getContentPane().add(jPanel1,  BorderLayout.CENTER); 
	         jPanel1.add(jButton1,  new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0  
	             ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(96, 11, 0, 0), 107, 0));  //关键就是根据需要调整这些参数  
	         jPanel1.add(jButton2,  new GridBagConstraints(0, 1, 1, 2, 0.0, 0.0  
	             ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(17, 11, 14, 0), 95, 0));  
	         jPanel1.add(jButton3,  new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0  
	            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 11, 120, 0), -1, 0)); 
	         jPanel1.add(jLabel1,  new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0  
	             ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 41, 0, 0), 11, 7));  
	         jPanel1.add(jTextField1,  new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0  
             ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 0, 18), 115, 0));  
	        jPanel1.add(jTextField2,  new GridBagConstraints(2, 2, 1, 1, 1.0, 0.0  
	             ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(13, 10, 0, 18), 85, 0));  
	         jPanel1.add(jLabel2,  new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0  
	             ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 44, 0, 0), 17, 0));  
	     }  
	 }
